package com.ext.portlet.registration.service.impl;

import java.rmi.RemoteException;
import java.util.List;

import com.ext.portlet.registration.model.Teacher;
import com.ext.portlet.registration.service.base.TeacherLocalServiceBaseImpl;
import com.ext.portlet.registration.service.persistence.TeacherUtil;
import com.liferay.portal.PortalException;
import com.liferay.portal.SystemException;


public class TeacherLocalServiceImpl extends TeacherLocalServiceBaseImpl {
	
	public List<Teacher> getAllTeachers()
		throws PortalException, SystemException, RemoteException {
			return teacherPersistence.findAll();
	}
	
	public List<Teacher> getByStatus(Integer status) throws SystemException{
		return TeacherUtil.findByStatus(status);
	}
	
	public Teacher teacherValidation(Long schoolId, String employeeId) throws SystemException{
		
		return teacherPersistence.fetchByTeacherValidation(schoolId, employeeId);		
	}
	public Teacher getByEmail(String emailAddress) throws SystemException{
		
		return teacherPersistence.fetchByEmailAddress(emailAddress);
	}

	public Teacher getByLoginId(String loginId) throws SystemException{		
		
		return TeacherUtil.fetchByLoginId(loginId);
	}
	
	public List<Teacher> getByUserId(Long userId) 
	throws SystemException {	

		return teacherPersistence.findByUserId(userId);
	}	

	public  List<Teacher> getByTeacherAndStatus(Long schoolId, Integer status) 
		throws SystemException {		
	
		return teacherPersistence.findBySchoolIdandStatus(schoolId, status);		
	}	
	
}
